<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title></title>  
    <link rel="stylesheet" href="../css/pintuer.css">
    <link rel="stylesheet" href="../css/admin.css">
    <script src="../js/jquery.js"></script>
    <script src="../js/pintuer.js"></script>  
    <script src="../js/jqPaginator.min.js"></script>  
</head>
<body>
<form method="post" action="">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 系统用户列表</strong></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a class="button border-main icon-plus-square-o" href="${ctx }/serve/systemUserForm.jsp"> 添加内容</a> </li>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
      	<th>ID</th>
        <th>用户名</th>    
        <th>状态</th>
        <th>创建时间</th>
        <th width="250">操作</th>       
      </tr>      
      <tbody id="content">
      
      	<c:forEach items="${systemUserList }" var="systemUser">
      		<tr>
	      		<td>${systemUser.id }</td>
	      		<td>${systemUser.userName }</td>
	      		<td>
	      			<c:if test="${systemUser.status==1 }">
	      				<font color="green">正常</font>
	      			</c:if>
	      			<c:if test="${systemUser.status==2 }">
	      				<font>停用</font>
	      			</c:if>
	      		</td>
	      		<td>${systemUser.createDateFormat }</td>
	      		<td><div class="button-group"> <a class="button border-main" href="${ctx }/systemUser/findById?id=${systemUser.id}"><span class="icon-edit"></span> 修改</a> <a class="button border-red" href="javascript:void(0);" onclick="return del(${systemUser.id})"><span class="icon-trash-o"></span> 删除</a> </div></td>
	      	</tr>	
      	</c:forEach>
      </tbody>
    </table>
  </div>
</form>
<script type="text/javascript">
//单个删除
function del(id){
	if(confirm("您确定要删除系统用户吗?")){
		window.location.href="${ctx }/systemUser/delete?id="+id;
	}
}
</script>
</body></html>